package com.fz.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by webrx on 2017-09-07.
 */
@Controller
@RequestMapping("/admin")
//这是拦截器的控制器
public class Admin {
    @RequestMapping("/show") @ResponseBody
    public String show(HttpServletRequest req){
        req.setAttribute("user","15937177279");
        System.out.println("hello-show()");
        return "hello-web";
    }

    //通过这个跳转到登录视图
    @RequestMapping("/login")
    public String login(){
        return "user/login";
    }

    @RequestMapping("/lll")
    public String user(){
        return "user/user";
    }
}
